package com.mobileares.midp.mui.client.list;

import com.mobileares.midp.widgets.client.list.ListItem;
import com.mobileares.midp.widgets.client.list.ListWidget;
import com.wwfish.gwt.model.client.impl.ListModel;
import com.wwfish.gwt.model.client.mui.BMWidget;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Tom
 * Date: 2011-11-22
 * Time: 14:51:09
 * To change this template use File | Settings | File Templates.
 */
public class UFishListWidget<T> extends BMWidget<ListWidget, List, ListModel<T>> {
    private ListWidget widget;

    public UFishListWidget() {
        widget = new ListWidget();
        initWidget(widget);
    }

    @Override
    public void ddOutModel() {
        List<T> model = fishWidget.getFishModel().getModel();
        widget.removeAll();
        if (model != null)
            for (T ob : model) {
                widget.addItem(ob);
            }
    }

    @Override
    public boolean ddIntModel() {
        return super.ddIntModel();
    }
}

